home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / KSLIB11.ARJ / KB.H < prev    next >
Text File  |  1991-11-07  |  3KB  |  132 lines

  1. /*
  2. *  KB.H
  3. */
  4.  
  5. #define    K_UPPER        0x0001    /* Accept upper case letters only                */
  6. #define K_BELL        0x0002    /* Sound bell if invalid key pressed            */
  7. #define K_RETURN    0x0004    /* Return <RETURN> if valid key pressed            */
  8.  
  9. #define    ZFLAG    64            /* Weighted Bit Value for 'Z' in flags register    */
  10.  
  11. /*
  12. *    Values returned from keyboard functions for extended keys.
  13. *    Many kept compatible with Greenleaf functions, whatever they are.
  14. */
  15.  
  16. #define F1            0x80
  17. #define F2            0x81
  18. #define F3            0x82
  19. #define F4            0x83
  20. #define F5            0x84
  21. #define F6            0x85
  22. #define F7            0x86
  23. #define F8            0x87
  24. #define F9            0x88
  25. #define F0            0x89
  26.  
  27. #define SF1            0x90
  28. #define SF2            0x91
  29. #define SF3            0x92
  30. #define SF4            0x93
  31. #define SF5            0x94
  32. #define SF6            0x95
  33. #define SF7            0x96
  34. #define SF8            0x97
  35. #define SF9            0x98
  36. #define SF0            0x99
  37.  
  38. #define CF1            0xA0
  39. #define CF2            0xA1
  40. #define CF3            0xA2
  41. #define CF4            0xA3
  42. #define CF5            0xA4
  43. #define CF6            0xA5
  44. #define CF7            0xA6
  45. #define CF8            0xA7
  46. #define CF9            0xA8
  47. #define CF0            0xA9
  48.  
  49. #define AF1            0xE0
  50. #define AF2            0xE1
  51. #define AF3            0xE2
  52. #define AF4            0xE3
  53. #define AF5            0xE4
  54. #define AF6            0xE5
  55. #define AF7            0xE6
  56. #define AF8            0xE7
  57. #define AF9            0xE8
  58. #define AF0            0xE9
  59.  
  60. #define ALT1        0xB0
  61. #define ALT2        0xB1
  62. #define ALT3        0xB2
  63. #define ALT4        0xB3
  64. #define ALT5        0xB4
  65. #define ALT6        0xB5
  66. #define ALT7        0xB6
  67. #define ALT8        0xB7
  68. #define ALT9        0xB8
  69. #define ALT0        0xB9
  70.  
  71. #define HOME        0x8A    /* HOME key        */
  72. #define CURLF        0x8B    /* <-            */
  73. #define END            0x8C    /* END key        */
  74. #define CURUP        0x8D    /* up arrow        */
  75. #define CURDN        0x8E    /* down arrow    */
  76. #define PGUP        0x9A    /* PgUp            */
  77. #define CURRT        0x9B    /* ->            */
  78. #define PGDN        0x9C    /* PgDn            */
  79. #define INSERT        0x9D    /* Ins            */
  80. #define DELETE        0x9E    /* Del            */
  81. #define CHOME        0xAA    /* Ctrl Home    */
  82. #define CCURLF        0xAB    /* Ctrl <-        */
  83. #define CEND        0xAC    /* Ctrl End        */
  84. #define CPRTSC        0xAE    /* Ctrl PrtSc    */
  85. #define CPGUP        0xBA    /* Ctrl PgUp    */
  86. #define CCURRT        0xBB    /* Ctrl ->        */
  87. #define CPGDN        0xBC    /* Ctrl PgDn    */
  88. #define AMINUS        0xBD    /* Alt -        */
  89. #define AEQUAL        0xBE    /* Alt =        */
  90. #define STAB        0x8F    /* Shift Tab    */
  91.  
  92. #define ALTA        0xC1
  93. #define ALTB        0xC2
  94. #define ALTC        0xC3
  95. #define ALTD        0xC4
  96. #define ALTE        0xC5
  97. #define ALTF        0xC6
  98. #define ALTG        0xC7
  99. #define ALTH        0xC8
  100. #define ALTI        0xC9
  101. #define ALTJ        0xCA
  102. #define ALTK        0xCB
  103. #define ALTL        0xCC
  104. #define ALTM        0xCD
  105. #define ALTN        0xCE
  106. #define ALTO        0xCF
  107. #define ALTP        0xD0
  108. #define ALTQ        0xD1
  109. #define ALTR        0xD2
  110. #define ALTS        0xD3
  111. #define ALTT        0xD4
  112. #define ALTU        0xD5
  113. #define ALTV        0xD6
  114. #define ALTW        0xD7
  115. #define ALTX        0xD8
  116. #define ALTY        0xD9
  117. #define ALTZ        0xDA
  118. #define THENUL        0xDB
  119.  
  120. /*
  121. *    Function Prototypes
  122. */
  123.  
  124. void    KBsetfunc(void (*func)(void));
  125. void    KBsettrap(uchar key,void (*func)(void));
  126. uchar    KBgetch(void);
  127. uchar    KBnwgetch(void);
  128. uchar    KBgetc(char *,char *,int);
  129. uchar    KBgets(char *,uint,int);
  130. uchar    KBgetn(double *,uint,uint);
  131. int        KBcheck(void);
  132.